<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        while(i=1){
            let name = prompt("请输入用户名")
            if(name == "sjl"){
                alert("yes")
                break
            }else{
                alert("no")
            }
            i++
        }
    </script>
</body>
</html>